**Final Project Report: Rendering Iridescent Spider Webs** (#) Nevindu M. Batagoda (F007ZBF)) (##) Motivational image
Image 1 Image 2 Image 3
[1]
[2]
[3]
Spider webs are a collection of entangled threads of silk. Individual spider silk threads are microscopically small and weak, but collectively they can form a strong network of webs. The webs of Australian Golden Orb Weavers, for example have a tensile strength stronger then steel. As seen in the images above, spider webs can produce beautiful iridescent colors when illuminated by sunlight. This is due to the interference effects caused by the microscopic diameter of the silk threads. These images show both entanglement in geometry and as well as a disentanglement in optics as such making it an interesting challenge to render. (##) What causes this effect? The iridescent colors seen in many spider silks arise primarily from thin-film interference in a nanoscale coating on the silk fibers. Although the full spider silk fiber is several micrometers thick, its outermost skin layer is only about 50-150 nanometers thick—comparable to the wavelength of visible light. When light strikes this thin outer layer, part of the light reflects from the outer surface, and part enters the layer and reflects from the interface with the inner core. These two reflected waves interfere, enhancing or suppressing specific wavelengths depending on the layer thickness and the viewing angle. This produces the characteristic angle-dependent colors. In addition to thin-film interference, the cylindrical geometry of the silk (typically 2-6 μm in diameter) causes diffraction and waveguiding effects that further modulate the colors. The combination of nanoscale thin-film interference and micrometer-scale diffraction produces the complex, shimmering iridescence observed in spider webs.
Constructive interference Destructive interference
(##) List of Features To achieve the final rendering of a spider web with iridescent colors, I implemented the following features in Darts: (##) Importing curve geometry into Darts - I modeled the spider web geometry in blender using cubic bezier curves. I then exported the geometry into a format similar to PBRT's curve format. Each curve is represented as a series of control points along with widths at each end point. - The geometry is generated by offsetting the central Bézier curve by half the width in directions orthogonal to the curve. - Because Bézier curves lie within the convex hull of their control points, you can bound the curve segment by the bounding box of its control points. - For intersection testing with a ray, I transform the curve control points into a coordinate space where the curve is aligned along +z and the origin is at the ray origin. This is for simplifying the intersection calculations. - I then use a recursive subdivision approach to find intersections. The curve is recursively subdivided until the curve is "flat". If the ray intersects the bounding box, I check for intersection with the flattened curve segment (approximated as a line segment) and compute the intersection point and normal.
Curve Geometry After shading
(##) Spectral Rendering - I adopted sampled spectrum representation similar to that of PBRTv3, where spectra are stored as values sampled over a discrete set of wavelengths, rather than as RGB triplets. This allows all rendering computations to be wavelength-dependent. - The renderer samples one wavelength per camera ray (hero wavelength sampling) and tracks its scalar “lambda_index” through all bounces. - I defined a fixed spectral basis spanning the visible range (400-700nm), matching PBRT's tabulated data resolution. Spectral data is interpolated within these tables when evaluating materials or phase functions. - All color textures and RGB material parameters are converted to spectra using the cathode-ray-tube (CRT) matching approach to ensure RGB inputs produce consistent, physically meaningful spectra. - At the end of rendering, samples are reconverted to RGB via integration using CIE XYZ color matching functions. - The spectral rendering framework was necessary for implementing the wave optics based hair scattering model, which requires wavelength-dependent computations. (##) Wave Optics Based Hair/Fiber Scattering Model - I implemented the wave-optics fiber BSDF from Xia et al., which extends the Marschner hair model with physically simulated diffraction data. - In the original Marschner model, each scattering mode (R, TT, TRT) is split into a longitudinal term along the fiber and an azimuthal term around the fiber. Xia et al. keeps the Marschner longitudinal term and only replaces the azimuthal part. - For each scattering mode \(p\), the azimuthal scattering is replaced by precomputed BSDF table \(M_p(\theta_i, \theta_o, \lambda)\) that depend on incoming angle, outgoing angle, and wavelength. These tables come from Electromagnetic simulations of light scattering in fibers. - The BSDF for each mode becomes: \( f_p(\omega_i, \omega_o, \lambda) = M_p(\theta_i, \theta_o, \lambda), N_p(\phi_i, \phi_o)\, A_p(\theta_i) \), where \(M_p\) is the wave-optics azimuthal term, \(N_p\) is the Marschner longitudinal term, and \(A_p\) is an attenuation factor. - By propagating a wavelength per ray and evaluating these BSDF tables at that wavelength, I get angle-dependent iridescent colors on the fibers that the original Marschner model cannot reproduce.
Hair scattering modes
Comparison of forward scattering caused by a single layer of 1 micrometer diameter fiber: Mine (left) vs Xia et al. (right) (Spectral Rendering + Wave Optics Hair BSDF)
Mine Xia et al.
(##) Final Image
Final Image
(##) Challenges - I could not get my results to exactly match the reference from Xi et al. - And I found that my method becomes incredbly noisy with spectral speckle artifacts with anything beyond 1 bounce, likely due to the wavelength sampling strategy. I haven't found a solution to this yet. (##) References References * [1] "Spider Web Optics", Dr. Rolf Zawischa, https://www.itp.uni-hannover.de/fileadmin/itp/emeritus/zawischa/static_html/spiderweb.html * [2] "Iridescent Spider Web", Stockcake, https://stockcake.com/i/iridescent-spider-web_715295_1118436 * [3] "Iridescent Spider Web", Flickr (A. Marianna), https://www.flickr.com/photos/39871759@N02/40117157923/'' * [4] "Thin-Film Interference", Wikipedia, https://en.wikipedia.org/wiki/Thin-film_interference * [5] Xia, M., Walter, B., Michielssen, E., Bindel, D., & Marschner, S. (2020). A Wave Optics Based Fiber Scattering Model. ACM Transactions on Graphics (TOG), 39(6), 1-16. * [6] "Fast Real-Time Shading for Polygonal Hair" (image reference), ResearchGate, https://www.researchgate.net/publication/368473470_Fast_Real_Time_Shading_for_Polygonal_Hair/figures